package pnu.ssm.general;

public class Palindrome {
	public static void main(String[] args) {
		String str = "abc cba";
		str = str.replaceAll("\\s", "");
		
		int left_pos = 0;
		int right_pos = str.length()-1;
		int iter = str.length() / 2;
		
		boolean palinQ = true;
		for(int i=0; i<iter; i++){
			if(str.charAt(left_pos) != str.charAt(right_pos)){
				palinQ = false;
				break;
			}
		}
		System.out.println(palinQ);
	}
}
